package com.hades.xq.prototype.shallow;

/**
 * 浅拷贝
 */
public class Person implements Cloneable {

    public Person() {
        System.out.println("构造函数执行了");
    }

    private String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public Person clone() throws CloneNotSupportedException {
        return (Person) super.clone();
    }
}
